package disjunction
{
	import disjunction.TimedUpdater;
	import disjunction.timing.SimulationTimer;
	
	import flash.events.TimerEvent;
	
	/**
	 * The View in the context of the (MVC) GameState. Actual view logic is handled
	 * through injected strategies.
	 * 
	 * Note that view contexts are expected to be ready by the time that the state is
	 * initialised, so that view processing can commence immediately.
	 * Thus, the context must either be one which allows immediate access, or it must
	 * have been prepared for immediate access in a prior state, or prepared outside
	 * of the state manager's scope, and then passed into the current one.
	 * 
	 * @author Nick Wiggill
	 */
	
	public class View extends TimedUpdater
	{
		public var model:Object;
		public var context:Object;
		
		public function initialise_(config:ViewConfig):void
		{
			super.initialiseTiming(config as TimingConfig);
			this.context = config.context;
			initialise(config); //subclass (user) initialisation
		}
		
		/** (abstract) */
		public function initialise(data:Object):void
		{
		}
	}
}